﻿using System;
using WF_AppFuel.Validation.Base;
using WF_AppFuel.Validation.Engines;

namespace WF_AppFuel.Validation.Attributes
{
    /// <summary>
    /// Attribute used for specifying that a property must have
    /// a value which is less than the check value of this attribute.
    /// </summary>
    /// <author>Dennis Q. Pitallano</author>
    public sealed class IsLessThan : BaseValidationAttribute
    {
        private object checkValue;

        public IsLessThan(object checkValue)
        {
            this.checkValue = checkValue;
            this.SetValidationMessage("Should Be Less Than " +
                checkValue.ToString());
        }

        public override Type ValidationEngineType
        {
            get { return typeof(IsLessThanValidationEngine); }
        }

        public object CheckValue { get { return this.checkValue; } }
    }
}
